package com.example.demo.entity;

import cn.hutool.core.util.IdUtil;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Document(collection = "base_biz")
@Data

public class BaseBiz implements java.io.Serializable {
    @Id
    private String id;
    private String tableName;
    private Date createTime;
    private Date updateTime;
    private String createUser;
    private String updateUser;

    private Boolean deleteFlag;

    private Integer stateFlag;
    private String remark;

    private Map<String,String> bizInfo;

    public BaseBiz() {
    }

    public BaseBiz(String tableName,String createUserUuid) {
        this.tableName = tableName;
        this.id= IdUtil.getSnowflakeNextIdStr();
        this.createTime = new Date();
        this.createUser = createUserUuid;
        this.deleteFlag = false;
        this.stateFlag= 0;
        this.bizInfo = new HashMap();
    }
}
